##################################################################
# PyngFM is a Python implementation of Ping.fm API.
#
# Version: 1.0
# Author: Andrea Grandi <a _DOT_ grandi _AT_ gmail _DOT_ com>
# License: GPL2
# Website: http://pyngfm.googlecode.com
#
# Note: this code is inspired to PHPingFM project.
##################################################################


class SystemService(object):
    def __init__(self, id=None, name=None, trigger=None, url=None, icon=None):
        self.__id = id
        self.__name = name
        self.__trigger = trigger
        self.__url = url
        self.__icon = icon
    
    @property
    def id(self):
        return self.__id
    
    @property
    def name(self):
        return self.__name
    
    @property
    def trigger(self):
        return self.__trigger
    
    @property
    def url(self):
        return self.__url
    
    @property
    def icon(self):
        return self.__icon

    def set_id(self, id):
        self.__id = id
        
    def set_name(self, name):
        self.__name = name
        
    def set_trigger(self, trigger):
        self.__trigger = trigger
        
    def set_url(self, url):
        self.__url = url
        
    def set_icon(self, icon):
        self.__icon = icon


class UserService(SystemService):
    def __init__(self, methods=None):
        self.__methods = methods
        
    @property
    def methods(self):
        return self.__methods
    
    def set_methods(self, methods):
        self.__methods = methods
